    <?php if(!empty($list)){?>
<span class="menuchildrenall children<?php echo $parent_id;?>">  
<select class="form-control  menuchildren"  onchange="menuselectchange(this)">
          <option value="-1">请选择分类</option>
          <?php foreach($list as $val){?>
           <option value="<?php echo $val['id'];?>"><?php echo $val['name'];?></option>
          <?php }?>
      
         
  </select>

</span>
   <?php }?>